<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>获取CSS属性</title>
		<script type="text/javascript" src="../../jQuery/jquery-3.4.1.js"></script>
		<script type="text/javascript">
			$(function(){
				$("#btn").click(function(){
					var str = $("p").css("color");
					alert("p元素的color属性值是：" + str);
				})
			})
		</script>
	</head>
	<body>
		<p style="color:red">绿叶学习网jQuery入门课程</p>
		<input type="button" id="btn" value="获取"/>
	</body>
</html>
